/*
Copyright 2021 huangpeng

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

#ifndef __HP_SPL06_00x_H__
#define __HP_SPL06_00x_H__
#include "stdint.h"
struct spl06_00x_calib_param_t {	
    int16_t c0;
    int16_t c1;
    int32_t c00;
    int32_t c10;
    int16_t c01;
    int16_t c11;
    int16_t c20;
    int16_t c21;
    int16_t c30;       
};
typedef struct  {	
    struct spl06_00x_calib_param_t calib_param;/**<calibration data*/	
    int32_t rawPressure;
    int32_t rawTemperature;
    int32_t kP;    
    int32_t kT;
}spl06_00x_t;

float get_calib_press(void);
float get_calib_temp(void);
void start_continuous(uint8_t mode);
void start_pressure(void);
void start_temperature(void);
void PRESS_getADC(void);
void TEMP_getADC(void);
uint8_t init_spl06_00x(void);
#endif

